Skip to content

Scotland | Glasgow| Mansoor Munawar | Sprint 2 | shell pipeline #516

Open
MansoorM11 wants to merge 1 commit into
CodeYourFuture:mainfrom
MansoorM11:shell-pipeline
Open

Scotland | Glasgow| Mansoor Munawar | Sprint 2 | shell pipeline #516
MansoorM11 wants to merge 1 commit into
CodeYourFuture:mainfrom
MansoorM11:shell-pipeline

Conversation

@MansoorM11
Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Completed the tasks in shell pipeline using ls, grep, sort, uniq, tail and tr

@MansoorM11 MansoorM11 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 4, 2026

# TODO: Write a command to count the number of files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters.
# Your output should be the number 7.
ls sample-files | grep '^[A-Z][^A-Z]*$' | wc -l | tr -d " " No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why pipe the count to tr -d " " ?

# so every Y should be a Z, and every Z should be a Y!
#
# TODO: Write a command to output the contents of text.txt with every Y and Z swapped (both upper and lower case).
cat text.txt | tr 'YZyz!' 'ZYzy.' No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec only requires swapping y and z.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants